package net.game.server.game;

import net.game.server.game.player.Player;
import net.game.server.util.Constants;
import net.game.server.util.graph.Graph;
import net.game.server.util.graph.impl.ArrayGraph;

public class World implements Constants {
    private static Graph<Player> players = new ArrayGraph<Player>(MAX_PLAYERS);
    
    public static void add(Player player) {
        players.plotNext(player);
        player.setIndex(players.indexOf(player)+1);
    }

    public static void remove(Player player) {
        players.remove(player);
        player.setIndex(-1);
    }
}
